package io;

import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;

/**
 * 在流连接中使用PW
 * @author Xiloer
 *
 */
public class PWDemo2 {
	public static void main(String[] args) throws IOException {
		FileOutputStream fos = new FileOutputStream("pw.txt",true);
		OutputStreamWriter osw = new OutputStreamWriter(fos,"UTF-8");
		BufferedWriter bw = new BufferedWriter(osw);
		PrintWriter pw = new PrintWriter(bw);
		
		pw.println("夜空中最亮的星，能否听清。");
		pw.println("那仰望的人心底的孤独和叹息。");
		System.out.println("写出完毕!");
		pw.close();
	}
}










